package com.weiyan.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author misterWei
 * @create 2020年03月08号:01点40分
 * @mailbox mynameisweiyan@gmail.com
 */
@RestController
@RefreshScope // 实时动态刷新配置文件内容
public class NacosConfigController {

    @Value("${env}")
    private  String env;

    @RequestMapping("/env")
    public String env(){
        return env;
    }

}
